/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package softclipping;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;

/**
 *
 * @author Nhat Lam
 */
public class frame extends JFrame implements KeyListener{
    public frame(){
        panel p = new panel();
        setBounds(250, 200, 500, 500);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setResizable(false);
        setAlwaysOnTop(true);
        addKeyListener(this);
        setContentPane(p);
    }

    @Override
    public void keyTyped(KeyEvent e) {

    }

    @Override
    public void keyPressed(KeyEvent e) {
        if(e.getKeyCode() == KeyEvent.VK_ESCAPE)
            System.exit(0);
    }

    @Override
    public void keyReleased(KeyEvent e) {

    }
}
